Skip to content

feat(objects): smooth an object along a ztrace in 3D - #177

Merged
dustenhubbard merged 9 commits into
mainfrom
feat/125-smooth-along-ztrace
Oct 16, 2026
Merged

dustenhubbard merged 9 commits into
mainfrom
feat/125-smooth-along-ztrace

Conversation

@dustenhubbard

Copy link
Copy Markdown
Member

Adds Smooth along ztrace... and Remove ztrace smoothing under Object attributes, as in Reconstruct. You choose a source ztrace, an optional target and a window (default 4). Only the 3D scene and mesh export apply the shift; traces, alignments and the object list's measurement columns are unchanged. Mesh files end in _smooth<N> or _smooth-<target>, and a scene file labels each smoothed object. Mesh export asks before replacing existing files.

Closes #125.

Object attributes > Smooth along ztrace... stores a source ztrace, an
optional target ztrace and a window on the object. When the 3D scene or
mesh export meshes it, each section is shifted from its source point to
the target point, or to a smoothed copy of the source fitted against
section depth. Traces, section transforms, the object list and its
measurements do not change. Exported meshes carry _smooth<N> or
_smooth-<target> in the file name, and the mesh data export gains a
ZtraceSmoothing column. Remove ztrace smoothing clears it; undo reverts
either.
Export scene names a smoothed mesh <obj>_smooth<N> or _smooth-<target>, alone and in the combined file. The coordinate readout and double-click take the shift back off. Renaming a ztrace updates the settings that name it; deleting one clears them in the same undo step, with a notice. A setting that cannot be applied meshes as traced with a warning naming the object. Series import skips the setting and lists the objects. The window counts ztrace points, and the dialog shows how deep N points reach. The manual says the measurement columns are unchanged.
The 3D scene keeps the depth each section was meshed at and reads a
point's section from it. The readout, the smoothing shift it takes off
and the section a double-click opens are then right when section
thicknesses differ. Renaming a ztrace moves its attributes, such as its
alignment, to the new name in the same undo step. Export scene refuses,
naming both objects, when two would be saved to one file. The manual
says a scene file keeps its name and labels each smoothed object inside.
The 3D readout no longer shows x and y for an object smoothed along a
ztrace: a point on a shifted mesh has no exact field coordinate. It
shows the name, the smoothing label and the section, and double-click
still goes to that section. Traced objects keep x and y. A point on a
deleted section reads "(removed)", and double-click asks to generate
the object again. The object list mesh export refuses two objects that
would save to one file, with the same check as the scene export.
A smoothed object is saved as <name>_smooth<N>, so exporting it into a folder that already held that file from a traced object of that name replaced the file without a word. The object-list export and Export scene now check the folder with the shared clash check before writing anything, and refuse with a message that names the object and the file. Export scene checks each object's obj and mtl files, which it writes before it makes the scene file.
A field with a comma in it, such as the label smooth-hand,edit from a target ztrace named hand,edit, was split into two columns. Rows are now written with csv.writer, which quotes such a field; other rows are written as before.
A mesh export from the object list, or the per-object files of Export
scene, that would write onto files already in the folder now shows one
dialog that lists every such file, with Overwrite and Cancel. Cancel
writes nothing; Overwrite replaces them as before. Two objects that map
to one file are still refused. notifyConfirm takes an optional label
for its OK button.
@dustenhubbard
dustenhubbard merged commit daa9a4c into main Oct 16, 2026
6 checks passed
@dustenhubbard
dustenhubbard deleted the feat/125-smooth-along-ztrace branch October 16, 2026 04:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3D: smooth an object along a smoothed z-trace

1 participant